package com.ipnc.dss.alive;

import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.filter.keepalive.KeepAliveFilter;
import org.apache.mina.filter.keepalive.KeepAliveMessageFactory;

public class IPNCKeepAliveFilter extends KeepAliveFilter {

	private static final int INTERVAL = 50;
	private static final int TIMEOUT = 20;

	public IPNCKeepAliveFilter(KeepAliveMessageFactory messageFactory) {
		super(messageFactory, IdleStatus.BOTH_IDLE, new ExceptionHandler(),
				INTERVAL, TIMEOUT);
		this.setForwardEvent(false);
	}

	public IPNCKeepAliveFilter() {
		super(new IPNCKeepAliveMessageFactory(), IdleStatus.BOTH_IDLE,
				new ExceptionHandler(), INTERVAL, TIMEOUT);
		this.setForwardEvent(false);
	}
}